if iot then iot:close() end
debug1='pushdata start!'
iot=net.createConnection(net.TCP,0)
iot:on('receive',function(client,pdata)
debug2=pdata;tmr.start(2)print('pushed')end)
iot:connect(8000,"iot.espressif.cn")
tmr.alarm(2,50000,2,function()
dofile('tem.lua')
iot:send(string.format([[{"path":"/v1/datastreams/temperature/datapoint","method":"POST","body":{"datapoint":{"x":]]..tem1..[[}},"meta":{"Authorization":"token 15ff6d403998522794785f6868a47d717235a3cf"}}
]]))
end)
